<template>
  <transition-group class="ys-notices" tag="ul" enter-active-class="animate__animated animate__fadeInUp" leave-active-class="animate__animated animate__fadeOutUp" >
    <li class="notice_content" v-show="index === currentIndex" v-for="(item,index) in noticeList" :key="item.id">
      {{item.title}}
    </li>
  </transition-group>
</template>
<script>
export default {
  props: {
    noticeList: {
      type: Array
    }
  },
  name: 'wt-notice',
  data() {
    return {
      currentIndex: 0
    };
  }
};
</script>
<style lang="less" rel="stylesheet/less" scoped>
  .notice_content{
    color:#000;
    font-size: 30px;
    list-style: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    position: absolute;
    width:100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: left;
  }
  .ys-notices{
    position: relative;
    width:100%;
    height:100%;
  }
</style>
